vim.api.nvim_create_autocmd("FileType", { pattern = "json", command = "set filetype=jsonc" })
vim.api.nvim_create_autocmd("FileType", { pattern = "zsh", command = "set filetype=sh" })

if vim.loop.os_uname().sysname == "Darwin" and vim.fn.executable "im-select" == 1 then
  vim.api.nvim_create_autocmd("ModeChanged", {
    pattern = { "*:n" },
    callback = function() vim.loop.spawn("im-select", { args = { "com.apple.keylayout.ABC" } }) end,
  })
end
